package cn.buk.api.szkj.dto.eterm.response;

import com.fasterxml.jackson.annotation.JsonProperty;

public class TslItemContent {

  @JsonProperty(value = "tktNumber")
  private String ticketNo;

  @JsonProperty(value = "orig")
  private String dport;

  @JsonProperty(value = "dest")
  private String aport;

  /**
   * 票号状态,TICKET开票,ET-REFUND退票，EX改签
   */
  @JsonProperty(value = "statu")
  private String status;

  @JsonProperty(value = "collection")
  private Double price;

  @JsonProperty(value = "taxs")
  private Double tax;


  /**
   * 接口返回的可以转化为数字的佣金
   */
  private Double commission;

  /**
   * 接口返回的原始字符串
   * 有可能是返回 "0.00%"
   */
  @JsonProperty(value = "comm")
  private String commission0;

  @JsonProperty(value = "pnr")
  private String pnrNo;

  public String getTicketNo() {
    return ticketNo;
  }

  public void setTicketNo(String ticketNo) {
    this.ticketNo = ticketNo;
  }

  public String getStatus() {
    return status;
  }

  public void setStatus(String status) {
    this.status = status;
  }

  public Double getPrice() {
    return price;
  }

  public void setPrice(Double price) {
    this.price = price;
  }

  public Double getTax() {
    return tax;
  }

  public void setTax(Double tax) {
    this.tax = tax;
  }

  public Double getCommission() {
    if (commission == null && commission0 != null) {
      try {
        commission = Double.parseDouble(commission0);
      } catch (Exception ex) {
        commission = 0d;
      }
    }
    return commission;
  }

  public void setCommission(Double commission) {
    this.commission = commission;
  }

  public String getPnrNo() {
    return pnrNo;
  }

  public void setPnrNo(String pnrNo) {
    this.pnrNo = pnrNo;
  }

  public String getCommission0() {
    return commission0;
  }

  public void setCommission0(String commission0) {
    this.commission0 = commission0;
  }

  public String getDport() {
    return dport;
  }

  public void setDport(String dport) {
    this.dport = dport;
  }

  public String getAport() {
    return aport;
  }

  public void setAport(String aport) {
    this.aport = aport;
  }


  //          "agent": "CAS"

}
